package com.sun.lib_compress;
/*
 *
 * #                                                   #
 * #                       _oo0oo_                     #
 * #                      o8888888o                    #
 * #                      88" . "88                    #
 * #                      (| -_- |)                    #
 * #                      0\  =  /0                    #
 * #                    ___/`---'\___                  #
 * #                  .' \\|     |# '.                 #
 * #                 / \\|||  :  |||# \                #
 * #                / _||||| -:- |||||- \              #
 * #               |   | \\\  -  #/ |   |              #
 * #               | \_|  ''\---/''  |_/ |             #
 * #               \  .-\__  '-'  ___/-. /             #
 * #             ___'. .'  /--.--\  `. .'___           #
 * #          ."" '<  `.___\_<|>_/___.' >' "".         #
 * #         | | :  `- \`.;`\ _ /`;.`/ - ` : | |       #
 * #         \  \ `_.   \_ __\ /__ _/   .-` /  /       #
 * #     =====`-.____`.___ \_____/___.-`___.-'=====    #
 * #                       `=---='                     #
 * #     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   #
 * #                                                   #
 * #               佛祖保佑         永无BUG              #
 * #                                                   #
 */

import java.io.File;

/**
 * 压缩回调类，运行在主线程
 * Created by ESSC07 on 2021/12/30.
 */
public interface OnCompressListener {
    /**
     * 开始压缩前
     */
    default void onStart() {
    }

    /**
     * 压缩成功
     *
     * @param file
     */
    void onSuccess(File file);

    /**
     * 压缩失败
     *
     * @param e
     */
    default void onError(Throwable e) {
    }

    /**
     * 压缩完成，成功或失败都会调用该方法
     */
    default void onComplete() {
    }
}
